home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJTST200.ZIP / tests / libc / posix / unistd / gcwd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-13  |  288 b   |  19 lines

  1. #include <unistd.h>
  2. #include <stdio.h>
  3.  
  4. int
  5. main(void)
  6. {
  7.   char buf[100], *bp;
  8.   fprintf(stderr, "hello, there\n");
  9.   fflush(stderr);
  10.   if ((bp = getcwd(buf, 100)) == 0)
  11.   {
  12.     perror("getcwd");
  13.     return 0;
  14.   }
  15.   fflush(stderr);
  16.   printf("`%s'\n", bp);
  17.   return 0;
  18. }
  19.